<?php 
include("function.php"); 
check_login();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-size:12px;
	background:#CCC;
}
div{
	margin-bottom:2px;	
	}
#change_leftframe_size {
	position:absolute;
	top:0px;
	right:0px;
	width:10px;
	height:100%;
	z-index:999;
	background-color:#09F;
	Writing-mode:tb-rl;
	text-align:center;
	color:#FFF;
	overflow: hidden;
	
}
-->

</style>
</head>

<body>
<div id="change_leftframe_size" onmouseover="showhand(this); show_msg(this);" onmouseout="hide_msg(this);" onclick="hide_frame(this);"></div>

<h2>//文档列表</h2>

<form action="doc_search.php" method="post" target="mainFrame" id="sss" onsubmit="return check_search_form();">
<label>搜索文档名称<br />

<input name="keyword" type="text" size="16" id="keyword" />
</label>
<input name="" type="submit" value="搜索" />

</form>

<form action="folder_add.php" method="post" target="_self" id="add" onsubmit="return check_add_form();">
<label>添加新文件夹<br />

<input name="new_folder_name" type="text" id="new_folder_name" size="16" />
</label>
<input name="" type="submit" value="添加" />
</form>


<?php
show_left_menu();
?>



<script>
function check_add_form(){
	if(document.getElementById("new_folder_name").value.length<=0){
		alert("您输入的文件夹名称为空或太短！");
		document.getElementById("new_folder_name").focus();
		return false;
		}	
	}
function check_search_form(){
	if(document.getElementById("keyword").value.length<=0){
		alert("请输入您要搜索的内容！");
		document.getElementById("keyword").focus();
		return false;
		}	
	}




function showhand(obj){//显示手型，未使用
	obj.style.cursor =	"hand";
}

function hide_msg(obj){
	if(parent.xia.cols == "220,*"){
		obj.innerHTML="";
		obj.style.width="10px";
		}else{
			obj.innerHTML="";
			obj.style.width="10px";
			parent.xia.cols = "10,*";
			}	
	}

function show_msg(obj){
	if(parent.xia.cols != "220,*"){
		obj.innerHTML="点击显示左侧文档列表";
		parent.xia.cols = "30,*";
		obj.style.width="30px";
		
		}else{
			obj.innerHTML="点击隐藏左侧文档列表";
			obj.style.width="30px";
			//obj.style.padding-right="10px";
			}
	
	//obj.style.background-color="#fff";
	
	}
//此函数借鉴客服系统
function hide_frame(obj){
		if(parent.xia.cols != "220,*"){
			parent.xia.cols = "220,*";
			
		}
		else{
			parent.xia.cols = "10,*";
			//obj.innerHTML="点击显示左侧文档列表";
		}
	}
	
function show_sub_folder(id){
	
	if(document.getElementById("sub_folder_"+id).style.display=="block"){
		document.getElementById("sub_folder_"+id).style.display="none";
		}else{
			document.getElementById("sub_folder_"+id).style.display="block";
			}
	
	}

</script>
</body>
</html>